Object Transactions
vFire has two Application Programming Interfaces (or APIs), which enable you to develop programs that automate many common vFire transactions. This section of the documentation deals with the Classic API. For more information on the RESTful Alemba API, introduced in 9.7, see here.
Objects can be attached to various items in vFire.
ObjectAttach Transaction
The ObjectAttach transaction can be used to link an object to an item.
The object size limit specified for entities in the main application does not apply to any objects uploaded via the API. Alemba recommends setting any size limit required in your own code. To find out the size limits that apply to objects being uploaded via the API, you should run the following queries:
- To find out the size limit when attaching objects to calls and CMDB items, run the query: SELECT NUMBER_STATUS FROM SU_SYS_PARAMETERS WHERE REF = 20
- To find out the size limit when attaching objects to requests, tasks and workflow templates, run the query: SELECT NUMBER_STATUS FROM CR_SYS_PARAMETERS WHERE REF = 5
These queries will return the object file size in kb.
The ObjectAttach transaction is only available through the COM/DCOM interface and not the Web Service.
Object uploads cannot be done via Web Services without using a wrapper API. Therefore, object uploads cannot be done via the Web Service Tester. As a file object is actually a binary array that cannot be entered in a text field, and the Web Service API tester does not allow for binary fields, the only way to test object uploads is via a wrapper API.
Input Parameters: ObjectAttachRequest
Argument |
Type |
Mandatory |
Default |
Description |
---|---|---|---|---|
sID |
String |
No. See Transaction Login. |
“” |
Analyst’s current Session ID |
sLoginUserID |
String |
No. See Transaction Login. |
“” |
Analyst’s Login ID |
sLoginPassword |
String |
No. See Transaction Login. |
“” |
Analyst’s Password |
sDatabase |
String |
No. See Transaction Login. |
“” |
Name of the vFire system for logging in. |
lEntityRef |
Lookup Field |
Yes |
- |
Entity reference in which to attach an object. |
eEntityType |
Enumerated |
Yes |
- |
Entity type in which to attach an object. Values:
|
sFileName |
String |
Yes |
- |
Path of the file to attach to the entity. |
xContent |
Byte() |
No |
- |
Object to attach. This field cannot be used via the WS tester application. |
nContentSize |
Integer |
No |
0 |
Size of the object to attach. This field is ignored if the object size can be calculated from the actual content. |
sObjectAbstract |
String |
No |
“” |
Object abstract |
sObjectTitle |
String |
No |
“” |
Object title |
yLite |
Yes/No |
No |
N |
Indicate whether this object is visible on the Self Service Portal. Values:
|
nVersion |
Integer |
No |
1 |
Object Version |
nVersionOrder |
Integer |
No |
1 |
Object Version order |
lSecurityProfile |
Lookup Field |
No |
0 |
Security profile to apply to the Object |
aCustomParameters |
Array |
No |
“” |
Return Values: ObjectAttachResponse
Argument |
Type |
Description |
---|---|---|
nEntityRef |
Integer |
New Object Ref |
String |
Error/warning Message |
|
Ret |
Error/Warning Number |